package com.pn.service.impl;

import com.pn.entity.OutStore;
import com.pn.entity.Result;
import com.pn.mapper.OutStoreMapper;
import com.pn.service.OutStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OutStoreServiceImpl implements OutStoreService {
    @Autowired
    private OutStoreMapper outStoreMapper;
    /**
     * 保存出库单
     *
     * @param outStore 出库单信息
     * @return 操作结果
     */
    @Override
    public Result saveOutStore(OutStore outStore) {
        int i = outStoreMapper.insertOutStore(outStore);
        if (i > 0) {
            return Result.ok("添加出库单成功");
        }
        return Result.err(Result.CODE_ERR_BUSINESS,"添加出库单失败！");
    }
}
